package com.alipay.pluginapp

import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.Gravity
import android.widget.Button
import android.widget.TextView


class MainActivity : BaseActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
       /* val textView = TextView(activity)
        textView.text = "点击跳转"
        textView.gravity = Gravity.CENTER
        setContentView(textView)
        textView.setOnClickListener {

        }*/
      //  val inflate = layoutInflater.inflate(R.layout.plugin_activity_main, null)

        val s = intent.getStringExtra("data") ?: ""
        val s1 = intent.getStringExtra("name")?:""
        Log.e("----",s)
        Log.e("----",s1)
        setContentView(R.layout.plugin_activity_main)
        findViewById(R.id.mBtnStart).setOnClickListener {
            val intent = Intent(getActivity(), SecondActivity::class.java)
            //这里其实调用父类的 最终会调用宿主里面的startActivity方法，下面会对其进行重写
            //这里其实调用父类的 最终会调用宿主里面的startActivity方法，下面会对其进行重写
            intent.putExtra("name","MainActivity")
            startActivity(intent)
        }
    }
}